package com.community.process._1010.dao.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.community.process._1010.common.base.BaseEntity;
import com.community.process._1010.domains.ProcessingCouponTypeDTO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.io.Serializable;
@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
@TableName("t_processing_coupon_type")
@Schema(description = "到餐加工菜品分类")
public class ProcessingCouponType extends BaseEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    @Schema(description = "食材名称")
    private String name;



    public ProcessingCouponType(ProcessingCouponTypeDTO.ProcessingcoupontypeAdd dto) {
        initBaseParams(dto);
    }

    public ProcessingCouponType(ProcessingCouponTypeDTO.ProcessingcoupontypeUpdate dto) {
        initBaseParams(dto);
    }

    private void initBaseParams(ProcessingCouponTypeDTO.IngredientsBase dto) {
        this.name = dto.getName();
    }
}
